//
//  DownLoadDetailTableViewCell.m
//  MapleLeaf
//
//  Created by WangZe on 15/11/30.
//  Copyright © 2015年 AntennaBabyTeam. All rights reserved.
//

#import "DownLoadDetailTableViewCell.h"

@implementation DownLoadDetailTableViewCell
- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier
{
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {
        [self createView];
    }
    return self;
}
- (void)createView
{
    self.picImageView = [[UIImageView alloc] init];
    [self.contentView addSubview:self.picImageView];
    
    self.nameLabel = [[UILabel alloc] init];
    [self.contentView addSubview:self.nameLabel];
    self.nameLabel.font = MyFont(16);
    self.nameLabel.text = @"name";
    
    self.stateLabel = [[UILabel alloc] init];
    [self.contentView addSubview:self.stateLabel];
    self.nameLabel.font = MyFont(14);
    self.stateLabel.textColor = [UIColor redColor];
    self.stateLabel.text = @"状态";
    NSLog(@"~~~~~~~~%f", self.contentView.frame.size.height);
}
- (void)layoutSubviews
{
    [super layoutSubviews];
   
    [self.picImageView mas_makeConstraints:^(MASConstraintMaker *make) {
        Left(self.contentView.mas_left, 5);
        Top(self.contentView.mas_top, 5);
        Right(self.nameLabel.mas_left, -10);
        Bottom(self.contentView.mas_bottom, - 5);
        WequalNum(self.contentView.frame.size.height / 4 * 3);
        
    }];
    [self.nameLabel mas_makeConstraints:^(MASConstraintMaker *make) {
        Left(self.picImageView.mas_right, 10);
        Top(self.contentView.mas_top, 5);
        Right(self.contentView.mas_right, -5);
        HequalNum(20);
    }];
    [self.stateLabel mas_makeConstraints:^(MASConstraintMaker *make) {
        Left(self.picImageView.mas_right, 10);
        Right(self.contentView.mas_right, -5);
        Bottom(self.contentView.mas_bottom, - 5);
        HequalNum(20);
    }];
}
- (void)awakeFromNib {
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
